Part Number Hot Search : 
M13251GE N2576G GBJ8A04 2A20111 1MD02004 32303 32303 MJD44H11
Product Description
Full Text Search
 

To Download PIC18F2458-IML Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2007 microchip technology inc. preliminary ds39887b pic18f2458/2553/4458/4553 data sheet 28/40/44-pin high-performance, enhanced flash, usb microcontrollers with 12-bit a/d and nanowatt technology
ds39887b-page ii preliminary ? 2007 microchip technology inc. information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyer?s risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, accuron, dspic, k ee l oq , k ee l oq logo, micro id , mplab, pic, picmicro, picstart, pro mate, rfpic and smartshunt are registered trademarks of micr ochip technology incorporated in the u.s.a. and other countries. amplab, filterlab, linear active thermistor, migratable memory, mxdev, mxlab, seeval, smartsensor and the embedded control solutions company are registered trademarks of microchip tec hnology incorporated in the u.s.a. analog-for-the-digital age, appl ication maestro, codeguard, dspicdem, dspicdem.net, dspicworks, ecan, economonitor, fansense, flexrom, fuzzylab, in-circuit serial programming, icsp, icepic, mindi, miwi, mpasm, mplab certified logo, mplib, mplink, pickit, picdem, picdem.net, piclab, pictail, powercal, powerinfo, powermate, powertool, real ice, rflab, select mode, smart serial, smarttel, total endurance, uni/o, wiperlock and zena are tr ademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of microchip technology incorporated in the u.s.a. all other trademarks mentioned herein are property of their respective companies. ? 2007, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. note the following details of the code protection feature on microchip devices: ? microchip products meet the specification cont ained in their particular microchip data sheet. ? microchip believes that its family of products is one of the mo st secure families of its kind on the market today, when used i n the intended manner and under normal conditions. ? there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip produc ts in a manner outside the operating specifications contained in microchip?s data sheets. most likely, the person doing so is engaged in theft of intellectual property. ? microchip is willing to work with the customer who is concerned about the integrity of their code. ? neither microchip nor any other semiconductor manufacturer c an guarantee the security of their code. code protection does not mean that we are guaranteeing the product as ?unbreakable.? code protection is constantly evolving. we at microchip are co mmitted to continuously improvi ng the code protection features of our products. attempts to break microchip?s c ode protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the company?s quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory and analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified.
? 2007 microchip technology inc. preliminary ds39887b-page 1 pic18f2458/2553/4458/4553 universal serial bus features: ? usb v2.0 compliant ? low speed (1.5 mb/s) and full speed (12 mb/s) ? supports control, interrupt, isochronous and bulk transfers ? supports up to 32 endpoints (16 bidirectional) ? 1-kbyte dual access ram for usb ? on-chip usb transceiver with on-chip voltage regulator ? interface for off-chip usb transceiver ? streaming parallel port (spp) for usb streaming transfers (40/44-pin devices only) power-managed modes: ? run: cpu on, peripherals on ? idle: cpu off, peripherals on ? sleep: cpu off, peripherals off ? idle mode currents down to 5.8 a typical ? sleep mode currents down to 0.1 a typical ? timer1 oscillator: 1.1 a typical, 32 khz, 2v ? watchdog timer: 2.1 a typical ? two-speed oscillator start-up special microcontroller features: ? c compiler optimized architecture with optional extended instruction set ? 100,000 erase/write cycle enhanced flash program memory typical ? 1,000,000 erase/write cycle data eeprom memory typical ? flash/data eeprom retention: > 40 years ? self-programmable under software control ? priority levels for interrupts ? 8 x 8 single-cycle hardware multiplier ? extended watchdog timer (wdt): - programmable period from 41 ms to 131s ? programmable code protection ? single-supply 5v in-circuit serial programming? (icsp?) via two pins ? in-circuit debug (icd) via two pins ? optional dedicated icd/icsp port (44-pin tqfp package only) ? wide operating voltage range (2.0v to 5.5v) flexible oscillator structure: ? four crystal modes, including high-precision pll for usb ? two external clock modes, up to 48 mhz ? internal oscillator block: - 8 user-selectable frequencies, from 31 khz to 8 mhz - user-tunable to compensate for frequency drift ? secondary oscillator using timer1 @ 32 khz ? dual oscillator options allow microcontroller and usb module to run at different clock speeds ? fail-safe clock monitor: - allows for safe shutdown if any clock stops peripheral highlights: ? high-current sink/source: 25 ma/25 ma ? three external interrupts ? four timer modules (timer0 to timer3) ? up to 2 capture/compare/pwm (ccp) modules: - capture is 16-bit, max. resolution 5.2 ns (t cy /16) - compare is 16-bit, max. resolution 83.3 ns (t cy ) - pwm output: pwm resolution is 1 to 10-bits ? enhanced capture/compare/pwm (eccp) module: - multiple output modes - selectable polarity - programmable dead time - auto-shutdown and auto-restart ? enhanced usart module: - lin bus support ? master synchronous serial port (mssp) module supporting 3-wire spi (all 4 modes) and i 2 c? master and slave modes ? 12-bit, up to 13-channel analog-to-digital converter module (a/d) with programmable acquisition time ? dual analog comparators with input multiplexing note: this document is supplemented by the ?pic18f2455/2550/4455/4550 data sheet? (ds39632). see section 1.0 ?device overview? . device program memory data memory i/o 12-bit a/d (ch) ccp/eccp (pwm) spp mssp eusart comp. timers 8/16-bit flash (bytes) # single-word instructions sram (bytes) eeprom (bytes) spi master i 2 c? pic18f2458 24k 12288 2048 256 24 10 2/0 no yy121/3 pic18f2553 32k 16384 pic18f4458 24k 12288 35 13 1/1 yes pic18f4553 32k 16384 28/40/44-pin high-per formance, enhanced flash, usb microcontrollers wi th 12-bit a/d and nanowatt technology
pic18f2458/2553/4458/4553 ds39887b-page 2 preliminary ? 2007 microchip technology inc. pin diagrams 40-pin pdip pic18f2458 28-pin spdip, soic pic18f2553 10 11 2 3 4 5 6 1 8 7 9 12 13 14 15 16 17 18 19 20 23 24 25 26 27 28 22 21 mclr /v pp /re3 ra0/an0 ra1/an1 ra2/an2/v ref -/cv ref ra3/an3/v ref + ra4/t0cki/c1out/rcv ra5/an4/ss /hlvdin/c2out v ss osc1/clki osc2/clko/ra6 rc0/t1oso/t13cki rc1/t1osi/ccp2 (1) /uoe rc2/ccp1 v usb rb7/kbi3/pgd rb6/kbi2/pgc rb5/kbi1/pgm rb4/an11/kbi0 rb3/an9/ccp2 (1) /vpo rb2/an8/int2/vmo rb1/an10/int1/sck/scl rb0/an12/int0/flt0/sdi/sda v dd v ss rc7/rx/dt/sdo rc6/tx/ck rc5/d+/vp rc4/d-/vm rb7/kbi3/pgd rb6/kbi2/pgc rb5/kbi1/pgm rb4/an11/kbi0/csspp rb3/an9/ccp2 (1) /vpo rb2/an8/int2/vmo rb1/an10/int1/sck/scl rb0/an12/int0/flt0/sdi/sda v dd v ss rd7/spp7/p1d rd6/spp6/p1c rd5/spp5/p1b rd4/spp4 rc7/rx/dt/sdo rc6/tx/ck rc5/d+/vp rc4/d-/vm rd3/spp3 rd2/spp2 mclr /v pp /re3 ra0/an0 ra1/an1 ra2/an2/v ref -/cv ref ra3/an3/v ref + ra4/t0cki/c1out/rcv ra5/an4/ss /hlvdin/c2out re0/an5/ck1spp re1/an6/ck2spp re2/an7/oespp v dd v ss osc1/clki osc2/clko/ra6 rc0/t1oso/t13cki rc1/t1osi/ccp2 (1) /uoe rc2/ccp1/p1a v usb rd0/spp0 rd1/spp1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 pic18f4458 pic18f4553 note 1: rb3 is the alternate pin for ccp2 multiplexing.
? 2007 microchip technology inc. preliminary ds39887b-page 3 pic18f2458/2553/4458/4553 pin diagrams (continued) 44-pin tqfp 44-pin qfn pic18f4458 pic18f4458 10 11 2 3 6 1 18 19 20 21 22 12 13 14 15 38 8 7 44 43 42 41 40 39 16 17 29 30 31 32 33 23 24 25 26 27 28 36 34 35 9 37 ra3/an3/v ref + ra2/an2/v ref -/cv ref ra1/an1 ra0/an0 mclr /v pp /re3 nc/icck (2) /icpgc (2) rb7/kbi3/pgd rb6/kbi2/pgc rb5/kbi1/pgm rb4/an11/kbi0/csspp nc/icdt (2) /icpgd (2) rc6/tx/ck rc5/d+/vp rc4/d-/vm rd3/spp3 rd2/spp2 rd1/spp1 rd0/spp0 v usb rc2/ccp1/p1a rc1/t1osi/ccp2 (1) /uoe nc/icports (2) nc/icrst (2) /icv pp (2) rc0/t1oso/t13cki osc2/clko/ra6 osc1/clki v ss v dd re2/an7/oespp re1/an6/ck2spp re0/an5/ck1spp ra5/an4/ss /hlvdin/c2out ra4/t0cki/c1out/rcv rc7/rx/dt/sdo rd4/spp4 rd5/spp5/p1b rd6/spp6/p1c v ss v dd rb0/an12/int0/flt0/sdi/sda rb1/an10/int1/sck/scl rb2/an8/int2/vmo rb3/an9/ccp2 (1) /vpo rd7/spp7/p1d 5 4 10 11 2 3 6 1 18 19 20 21 22 12 13 14 15 38 8 7 44 43 42 41 40 39 16 17 29 30 31 32 33 23 24 25 26 27 28 36 34 35 9 37 ra3/an3/v ref + ra2/an2/v ref -/cv ref ra1/an1 ra0/an0 mclr /v pp /re3 rb7/kbi3/pgd rb6/kbi2/pgc rb5/kbi1/pgm rb4/an11/kbi0/csspp nc rc6/tx/ck rc5/d+/vp rc4/d-/vm rd3/spp3 rd2/spp2 rd1/spp1 rd0/spp0 v usb rc2/ccp1/p1a rc1/t1osi/ccp2 (1) /uoe rc0/t1oso/t13cki osc2/clko/ra6 osc1/clki v ss v dd re2/an7/oespp re1/an6/ck2spp re0/an5/ck1spp ra5/an4/ss /hlvdin/c2out ra4/t0cki/c1out/rcv rc7/rx/dt/sdo rd4/spp4 rd5/spp5/p1b rd6/spp6/p1c v ss v dd rb0/an12/int0/flt0/sdi/sda rb1/an10/int1/sck/scl rb2/an8/int2/vmo rb3/an9/ccp2 (1) /vpo rd7/spp7/p1d 5 4 v ss v dd v dd note 1: rb3 is the alternate pin for ccp2 multiplexing. 2: special icport features are available only in 44-pin tqfp packages. see section 25.9 ?special icport features? in the ?pic18f2455/2550/4455/4550 data sheet?? . pic18f4553 pic18f4553
pic18f2458/2553/4458/4553 ds39887b-page 4 preliminary ? 2007 microchip technology inc. table of contents 1.0 device overview ............................................................................................................. ............................................................. 5 2.0 12-bit analog-to-digital converter (a/d) module ............................................................................. .......................................... 19 3.0 special features of the cpu ................................................................................................. ..................................................... 29 4.0 electrical characteristics .................................................................................................. .......................................................... 31 5.0 packaging information....................................................................................................... ......................................................... 35 appendix a: revision history................................................................................................... ............................................................ 37 appendix b: device differences................................................................................................. .......................................................... 37 appendix c: migration from mid-range to enhanced devices....................................................................... .................................... 38 appendix d: migration from high-end to enhanc ed devices ........................................................................ ..................................... 38 index .......................................................................................................................... .......................................................................... 39 the microchip web site ......................................................................................................... .............................................................. 41 customer change notification service ........................................................................................... ..................................................... 41 customer support ............................................................................................................... ................................................................. 41 reader response ................................................................................................................ ................................................................ 42 product identification system.................................................................................................. ............................................................. 43 to our valued customers it is our intention to provide our valued customers with the be st documentation possible to ensure successful use of your micro chip products. to this end, we will continue to improve our publications to better suit your needs. our publications will be refined and enhanced as new volumes and updates are introduced. if you have any questions or comments regardi ng this publication, please contact the marketing communications department via e-mail at docerrors@microchip.com or fax the reader response form in the back of this data sheet to (480) 792-4150. we welcome your feedback. most current data sheet to obtain the most up-to-date version of this data s heet, please register at our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page . the last character of the literature number is the vers ion number, (e.g., ds30000a is version a of document ds30000). errata an errata sheet, describing minor operational differences fr om the data sheet and recommended workarounds, may exist for curren t devices. as device/documentation issues become known to us, we will publish an errata sheet. the errata will specify the revisi on of silicon and revision of document to which it applies. to determine if an errata sheet exists for a particular device, please check with one of the following: ? microchip?s worldwide web site; http://www.microchip.com ? your local microchip sales office (see last page) when contacting a sales office, please specify which device, re vision of silicon and data sheet (include literature number) you are using. customer notification system register on our web site at www.microchip.com to receive the most current information on all of our products.
? 2007 microchip technology inc. preliminary ds39887b-page 5 pic18f2458/2553/4458/4553 1.0 device overview this document contains device-specific information for the following devices: the pic18f4553 family of devices offers the advan- tages of all pic18 microcontrollers ? namely, high computational performance at an economical price ? with the addition of high-endurance, enhanced flash program memory. in addition to these features, the pic18f4553 family introduces design enhancements that make these microcontrollers a logical choice for many high-performance, power sensitive applications. 1.1 special features ? 12-bit a/d converter: the pic18f4553 family implements a 12-bit a/d converter. the a/d converter incorporates programmable acquisi- tion time. this allows for a channel to be selected and a conversion to be initiated, without waiting for a sampling period and thus, reducing code overhead. 1.2 details on individual family members the pic18f2458/2553/4458/4553 devices are available in 28-pin and 40/44-pin packages. block diagrams for the two groups are shown in figure 1-1 and figure 1-2. the devices are differentiated from each other in the following ways: 1. flash program memory (24 kbytes for pic18fx458 devices, 32 kbytes for pic18fx553). 2. a/d channels (10 for 28-pin devices, 13 for 40-pin and 44-pin devices). 3. i/o ports (3 bidirectional ports and 1 input only port on 28-pin devices, 5 bidirectional ports on 40-pin and 44-pin devices). 4. ccp and enhanced ccp implementation (28-pin devices have two standard ccp modules, 40-pin and 44-pin devices have one standard ccp module and one eccp module). 5. streaming parallel port (present only on 40/44-pin devices). all other features for devices in this family are identical. these are summarized in table 1-1. the pinouts for all devices are listed in table 1-2 and table 1-3. members of the pic18f4553 family are available as both standard and low-voltage devices. standard devices with enhanced flash memory, designated with an ?f? in the part number (such as pic18 f 2458), accommodate an operating v dd range of 4.2v to 5.5v. low-voltage parts, designated by ?lf? (such as pic18 lf 2458), function over an extended v dd range of 2.0v to 5.5v. ? pic18f2458 ? pic18f4458 ? pic18f2553 ? pic18f4553 note: this data sheet documents only the devices? features and specifications that are in addition to the features and specifica- tions of the pic18f2455/2550/4455/4550 devices. for information on the features and specifications shared by the pic18f2458/2553/4458/4553 and pic18f2455/2550/4455/4550 devices, see the ? pic18f2455/2550/4455/4550 data sheet? (ds39632).
pic18f2458/2553/4458/4553 ds39887b-page 6 preliminary ? 2007 microchip technology inc. table 1-1: device features features pic18f2458 pic18f2553 pic18f4458 pic18f4553 operating frequency dc ? 48 mhz dc ? 48 mhz dc ? 48 mhz dc ? 48 mhz program memory (bytes) 24576 32768 24576 32768 program memory (instructions) 12288 16384 12288 16384 data memory (bytes) 2048 2048 2048 2048 data eeprom memory (bytes) 256 256 256 256 interrupt sources 19 19 20 20 i/o ports ports a, b, c, (e) ports a, b, c, (e) ports a, b, c, d, e ports a, b, c, d, e timers 4 4 4 4 capture/compare/pwm modules 2 2 1 1 enhanced capture/ compare/pwm modules 0 0 1 1 serial communications mssp, enhanced usart mssp, enhanced usart mssp, enhanced usart mssp, enhanced usart universal serial bus (usb) module 1 1 1 1 streaming parallel port (spp) no no yes yes 12-bit analog-to-digital converter module 10 input channels 10 input channels 13 input channels 13 input channels comparators 2 2 2 2 resets (and delays) por, bor, wdt, reset instruction, stack full, stack underflow, mclr (optional), (pwrt, ost) por, bor, wdt, reset instruction, stack full, stack underflow, mclr (optional), (pwrt, ost) por, bor, wdt, reset instruction, stack full, stack underflow, mclr (optional), (pwrt, ost) por, bor, wdt, reset instruction, stack full, stack underflow, mclr (optional), (pwrt, ost) programmable high/ low-voltage detect yes yes yes yes programmable brown-out reset yes yes yes yes instruction set 75 instructions; 83 with extended instruction set enabled 75 instructions; 83 with extended instruction set enabled 75 instructions; 83 with extended instruction set enabled 75 instructions; 83 with extended instruction set enabled packages 28-pin spdip 28-pin soic 28-pin spdip 28-pin soic 40-pin pdip 44-pin qfn 44-pin tqfp 40-pin pdip 44-pin qfn 44-pin tqfp corresponding devices with 10-bit a/d pic18f2455 pic18f2550 pic18f4455 pic18f4550
? 2007 microchip technology inc. preliminary ds39887b-page 7 pic18f2458/2553/4458/4553 figure 1-1: pic18f2458/2553 (28-pin) block diagram data latch data memory (2 kbytes) address latch data address<12> 12 access bsr 44 pch pcl pclath 8 31 level stack program counter prodl prodh 8 x 8 multiply 8 8 8 alu<8> address latch program memory (24/32 kbytes) data latch 20 8 8 table pointer<21> inc/dec logic 21 8 data bus<8> ta b l e la t c h 8 ir 12 3 rom latch pclatu pcu porte mclr /v pp /re3 (1) note 1: re3 is multiplexed with mclr and is only available when the mclr resets are disabled. 2: osc1/clki and osc2/clko are only available in select oscillator modes and when these pins are not being used as digital i/o. 3: rb3 is the alternate pin for ccp2 multiplexing. w instruction bus <16> stkptr bank 8 8 8 bitop fsr0 fsr1 fsr2 inc/dec address 12 decode logic eusart comparator mssp 12-bit adc timer2 timer1 timer3 timer0 hlvd ccp2 bor data eeprom usb instruction decode & control state machine control signals power-up timer oscillator start-up timer power-on reset watchdog timer osc1 (2) osc2 (2) v dd , brown-out reset internal oscillator fail-safe clock monitor reference band gap v ss mclr (1) block intrc oscillator 8 mhz oscillator single-supply programming in-circuit debugger t1osi t1oso usb voltage regulator v usb portb portc rb0/an12/int0/flt0/sdi/sda rc0/t1oso/t13cki rc1/t1osi/ccp2 (3) /uoe rc2/ccp1 rc4/d-/vm rc5/d+/vp rc6/tx/ck rc7/rx/dt/sdo rb1/an10/int1/sck/scl rb2/an8/int2/vmo rb3/an9/ccp2 (3) /vpo rb4/an11/kbi0 rb5/kbi1/pgm rb6/kbi2/pgc rb7/kbi3/pgd porta ra4/t0cki/c1out/rcv ra5/an4/ss /hlvdin/c2out ra3/an3/v ref + ra2/an2/v ref -/cv ref ra1/an1 ra0/an0 osc2/clko/ra6 ccp1
pic18f2458/2553/4458/4553 ds39887b-page 8 preliminary ? 2007 microchip technology inc. figure 1-2: pic18f4458/4553(40/44-pin) block diagram instruction decode & control data latch data memory (2 kbytes) address latch data address<12> 12 access bsr 44 pch pcl pclath 8 31 level stack program counter prodl prodh 8 x 8 multiply 8 bitop 8 8 alu<8> address latch program memory (24/32 kbytes) data latch 20 8 8 table pointer<21> inc/dec logic 21 8 data bus<8> table latch 8 ir 12 3 rom latch portd rd0/spp0:rd4/spp4 pclatu pcu porte mclr /v pp /re3 (1) re2/an7/oespp re0/an5/ck1spp re1/an6/ck2spp note 1: re3 is multiplexed with mclr and is only available when the mclr resets are disabled. 2: osc1/clki and osc2/clko are only available in select oscillator modes and when these pins are not being used as digital i/o. 3: these pins are only available on 44-pin tqfp packages under certain conditions. 4: rb3 is the alternate pin for ccp2 multiplexing. eusart comparator mssp 12-bit adc timer2 timer1 timer3 timer0 ccp2 hlvd eccp1 bor data eeprom w instruction bus <16> stkptr bank 8 state machine control signals 8 8 power-up timer oscillator start-up timer power-on reset watchdog timer osc1 (2) osc2 (2) v dd , v ss brown-out reset internal oscillator fail-safe clock monitor reference band gap mclr (1) block intrc oscillator 8 mhz oscillator single-supply programming in-circuit debugger t1osi t1oso rd5/spp5/p1b rd6/spp6/p1c rd7/spp7/p1d porta portb portc ra4/t0cki/c1out/rcv ra5/an4/ss /hlvdin/c2out rb0/an12/int0/flt0/sdi/sda rc0/t1oso/t13cki rc1/t1osi/ccp2 (4) /uoe rc2/ccp1/p1a rc4/d-/vm rc5/d+/vp rc6/tx/ck rc7/rx/dt/sdo ra3/an3/v ref + ra2/an2/v ref -/cv ref ra1/an1 ra0/an0 rb1/an10/int1/sck/scl rb2/an8/int2/vmo rb3/an9/ccp2 (4) /vpo osc2/clko/ra6 rb4/an11/kbi0/csspp rb5/kbi1/pgm rb6/kbi2/pgc rb7/kbi3/pgd usb fsr0 fsr1 fsr2 inc/dec address 12 decode logic usb voltage regulator v usb icrst (3) icpgc (3) icpgd (3) icports (3)
? 2007 microchip technology inc. preliminary ds39887b-page 9 pic18f2458/2553/4458/4553 table 1-2: pic18f2458/2553 pinout i/o descriptions pin name pin number pin type buffer type description spdip, soic m clr /v pp /re3 mclr v pp re3 1 i p i st st master clear (input) or programming voltage (input). master clear (reset) input. this pin is an active-low reset to the device. programming voltage input. digital input. osc1/clki osc1 clki 9 i i analog analog oscillator crystal or external clock input. oscillator crystal input or external clock source input. external clock source input. always associated with pin function osc1. (see osc2/clko pin.) osc2/clko/ra6 osc2 clko ra6 10 o o i/o ? ? ttl oscillator crystal or clock output. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. in select modes, osc2 pin outputs clko which has 1/4 the frequency of osc1 and denotes the instruction cycle rate. general purpose i/o pin. legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set.
pic18f2458/2553/4458/4553 ds39887b-page 10 preliminary ? 2007 microchip technology inc. porta is a bidirectional i/o port. ra0/an0 ra0 an0 2 i/o i ttl analog digital i/o. analog input 0. ra1/an1 ra1 an1 3 i/o i ttl analog digital i/o. analog input 1. ra2/an2/v ref -/cv ref ra2 an2 v ref - cv ref 4 i/o i i o ttl analog analog analog digital i/o. analog input 2. a/d reference voltage (low) input. analog comparator reference output. ra3/an3/v ref + ra3 an3 v ref + 5 i/o i i ttl analog analog digital i/o. analog input 3. a/d reference voltage (high) input. ra4/t0cki/c1out/rcv ra4 t0cki c1out rcv 6 i/o i o i st st ? ttl digital i/o. timer0 external clock input. comparator 1 output. external usb transceiver rcv input. ra5/an4/ss / hlvdin/c2out ra5 an4 ss hlvdin c2out 7 i/o i i i o ttl analog ttl analog ? digital i/o. analog input 4. spi slave select input. high/low-voltage detect input. comparator 2 output. ra6 ? ? ? see the osc2/clko/ra6 pin. table 1-2: pic18f2458/2553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description spdip, soic legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set.
? 2007 microchip technology inc. preliminary ds39887b-page 11 pic18f2458/2553/4458/4553 portb is a bidirectional i/o port. portb can be software programmed for internal weak pull-ups on all inputs. rb0/an12/int0/flt0/ sdi/sda rb0 an12 int0 flt0 sdi sda 21 i/o i i i i i/o ttl analog st st st st digital i/o. analog input 12. external interrupt 0. pwm fault input (ccp1 module). spi data in. i 2 c? data i/o. rb1/an10/int1/sck/ scl rb1 an10 int1 sck scl 22 i/o i i i/o i/o ttl analog st st st digital i/o. analog input 10. external interrupt 1. synchronous serial clock input/output for spi mode. synchronous serial clock input/output for i 2 c mode. rb2/an8/int2/vmo rb2 an8 int2 vmo 23 i/o i i o ttl analog st ? digital i/o. analog input 8. external interrupt 2. external usb transceiver vmo output. rb3/an9/ccp2/vpo rb3 an9 ccp2 (1) vpo 24 i/o i i/o o ttl analog st ? digital i/o. analog input 9. capture 2 input/compare 2 output/pwm 2 output. external usb transceiver vpo output. rb4/an11/kbi0 rb4 an11 kbi0 25 i/o i i ttl analog ttl digital i/o. analog input 11. interrupt-on-change pin. rb5/kbi1/pgm rb5 kbi1 pgm 26 i/o i i/o ttl ttl st digital i/o. interrupt-on-change pin. low-voltage icsp? programming enable pin. rb6/kbi2/pgc rb6 kbi2 pgc 27 i/o i i/o ttl ttl st digital i/o. interrupt-on-change pin. in-circuit debugger and icsp programming clock pin. rb7/kbi3/pgd rb7 kbi3 pgd 28 i/o i i/o ttl ttl st digital i/o. interrupt-on-change pin. in-circuit debugger and icsp programming data pin. table 1-2: pic18f2458/2553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description spdip, soic legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set.
pic18f2458/2553/4458/4553 ds39887b-page 12 preliminary ? 2007 microchip technology inc. portc is a bidirectional i/o port. rc0/t1oso/t13cki rc0 t1oso t13cki 11 i/o o i st ? st digital i/o. timer1 oscillator output. timer1/timer3 external clock input. rc1/t1osi/ccp2/uoe rc1 t1osi ccp2 (2) uoe 12 i/o i i/o ? st cmos st ? digital i/o. timer1 oscillator input. capture 2 input/compare 2 output/pwm2 output. external usb transceiver oe output. rc2/ccp1 rc2 ccp1 13 i/o i/o st st digital i/o. capture 1 input/compare 1 output/pwm1 output. rc4/d-/vm rc4 d- vm 15 i i/o i ttl ? ttl digital input. usb differential minus line (input/output). external usb transceiver vm input. rc5/d+/vp rc5 d+ vp 16 i i/o o ttl ? ttl digital input. usb differential plus line (input/output). external usb transceiver vp input. rc6/tx/ck rc6 tx ck 17 i/o o i/o st ? st digital i/o. eusart asynchronous transmit. eusart synchronous clock (see rx/dt). rc7/rx/dt/sdo rc7 rx dt sdo 18 i/o i i/o o st st st ? digital i/o. eusart asynchronous receive. eusart synchronous data (see tx/ck). spi data out. re3 ? ? ? see mclr /v pp /re3 pin. v usb 14 o p ? ? internal usb transceiver power supply. when the internal usb regulator is enabled, v usb is the regulator output. when the internal usb regulator is disabled, v usb is the power input for the usb transceiver. v ss 8, 19 p ? ground reference for logic and i/o pins. v dd 20 p ? positive supply for logic and i/o pins. table 1-2: pic18f2458/2553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description spdip, soic legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set.
? 2007 microchip technology inc. preliminary ds39887b-page 13 pic18f2458/2553/4458/4553 table 1-3: pic18f4458/4553 pi nout i/o descriptions pin name pin number pin type buffer type description pdip qfn tqfp mclr /v pp /re3 mclr v pp re3 11818 i p i st st master clear (input) or programming voltage (input). master clear (reset) input. this pin is an active-low reset to the device. programming voltage input. digital input. osc1/clki osc1 clki 13 32 30 i i analog analog oscillator crystal or external clock input. oscillator crystal input or external clock source input. external clock source input. always associated with pin function osc1. (see osc2/clko pin.) osc2/clko/ra6 osc2 clko ra6 14 33 31 o o i/o ? ? ttl oscillator crystal or clock output. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. in rc mode, osc2 pin outputs clko which has 1/4 the frequency of osc1 and denotes the instruction cycle rate. general purpose i/o pin. legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set. 3: these pins are no connect unless the icprt configuration bit is set. for nc/icports, the pin is no connect unless icprt is set and the debug configuration bit is cleared.
pic18f2458/2553/4458/4553 ds39887b-page 14 preliminary ? 2007 microchip technology inc. porta is a bidirectional i/o port. ra0/an0 ra0 an0 21919 i/o i ttl analog digital i/o. analog input 0. ra1/an1 ra1 an1 32020 i/o i ttl analog digital i/o. analog input 1. ra2/an2/v ref -/ cv ref ra2 an2 v ref - cv ref 42121 i/o i i o ttl analog analog analog digital i/o. analog input 2. a/d reference voltage (low) input. analog comparator reference output. ra3/an3/v ref + ra3 an3 v ref + 52222 i/o i i ttl analog analog digital i/o. analog input 3. a/d reference voltage (high) input. ra4/t0cki/c1out/ rcv ra4 t0cki c1out rcv 62323 i/o i o i st st ? ttl digital i/o. timer0 external clock input. comparator 1 output. external usb transceiver rcv input. ra5/an4/ss / hlvdin/c2out ra5 an4 ss hlvdin c2out 72424 i/o i i i o ttl analog ttl analog ? digital i/o. analog input 4. spi slave select input. high/low-voltage detect input. comparator 2 output. ra6 ? ? ? ? ? see the osc2/clko/ra6 pin. table 1-3: pic18f4458/4553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description pdip qfn tqfp legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set. 3: these pins are no connect unless the icprt configuration bit is set. for nc/icports, the pin is no connect unless icprt is set and the debug configuration bit is cleared.
? 2007 microchip technology inc. preliminary ds39887b-page 15 pic18f2458/2553/4458/4553 portb is a bidirectional i/o port. portb can be soft- ware programmed for internal weak pull-ups on all inputs. rb0/an12/int0/ flt0/sdi/sda rb0 an12 int0 flt0 sdi sda 33 9 8 i/o i i i i i/o ttl analog st st st st digital i/o. analog input 12. external interrupt 0. enhanced pwm fault input (eccp1 module). spi data in. i 2 c? data i/o. rb1/an10/int1/sck/ scl rb1 an10 int1 sck scl 34 10 9 i/o i i i/o i/o ttl analog st st st digital i/o. analog input 10. external interrupt 1. synchronous serial clock input/output for spi mode. synchronous serial clock input/output for i 2 c mode. rb2/an8/int2/vmo rb2 an8 int2 vmo 35 11 10 i/o i i o ttl analog st ? digital i/o. analog input 8. external interrupt 2. external usb transceiver vmo output. rb3/an9/ccp2/vpo rb3 an9 ccp2 (1) vpo 36 12 11 i/o i i/o o ttl analog st ? digital i/o. analog input 9. capture 2 input/compare 2 output/pwm 2 output. external usb transceiver vpo output. rb4/an11/kbi0/csspp rb4 an11 kbi0 csspp 37 14 14 i/o i i o ttl analog ttl ? digital i/o. analog input 11. interrupt-on-change pin. spp chip select control output. rb5/kbi1/pgm rb5 kbi1 pgm 38 15 15 i/o i i/o ttl ttl st digital i/o. interrupt-on-change pin. low-voltage icsp? programming enable pin. rb6/kbi2/pgc rb6 kbi2 pgc 39 16 16 i/o i i/o ttl ttl st digital i/o. interrupt-on-change pin. in-circuit debugger and icsp programming clock pin. rb7/kbi3/pgd rb7 kbi3 pgd 40 17 17 i/o i i/o ttl ttl st digital i/o. interrupt-on-change pin. in-circuit debugger and icsp programming data pin. table 1-3: pic18f4458/4553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description pdip qfn tqfp legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set. 3: these pins are no connect unless the icprt configuration bit is set. for nc/icports, the pin is no connect unless icprt is set and the debug configuration bit is cleared.
pic18f2458/2553/4458/4553 ds39887b-page 16 preliminary ? 2007 microchip technology inc. portc is a bidirectional i/o port. rc0/t1oso/t13cki rc0 t1oso t13cki 15 34 32 i/o o i st ? st digital i/o. timer1 oscillator output. timer1/timer3 external clock input. rc1/t1osi/ccp2/ uoe rc1 t1osi ccp2 (2) uoe 16 35 35 i/o i i/o o st cmos st ? digital i/o. timer1 oscillator input. capture 2 input/compare 2 output/pwm2 output. external usb transceiver oe output. rc2/ccp1/p1a rc2 ccp1 p1a 17 36 36 i/o i/o o st st ttl digital i/o. capture 1 input/compare 1 output/pwm1 output. enhanced ccp1 pwm output, channel a. rc4/d-/vm rc4 d- vm 23 42 42 i i/o i ttl ? ttl digital input. usb differential minus line (input/output). external usb transceiver vm input. rc5/d+/vp rc5 d+ vp 24 43 43 i i/o i ttl ? ttl digital input. usb differential plus line (input/output). external usb transceiver vp input. rc6/tx/ck rc6 tx ck 25 44 44 i/o o i/o st ? st digital i/o. eusart asynchronous transmit. eusart synchronous clock (see rx/dt). rc7/rx/dt/sdo rc7 rx dt sdo 26 1 1 i/o i i/o o st st st ? digital i/o. eusart asynchronous receive. eusart synchronous data (see tx/ck). spi data out. table 1-3: pic18f4458/4553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description pdip qfn tqfp legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set. 3: these pins are no connect unless the icprt configuration bit is set. for nc/icports, the pin is no connect unless icprt is set and the debug configuration bit is cleared.
? 2007 microchip technology inc. preliminary ds39887b-page 17 pic18f2458/2553/4458/4553 portd is a bidirectional i/o port or a streaming parallel port (spp). portd can be software programmed for internal weak pull-ups on all inputs. these pins have ttl input buffers when the spp module is enabled. rd0/spp0 rd0 spp0 19 38 38 i/o i/o st ttl digital i/o. streaming parallel port data. rd1/spp1 rd1 spp1 20 39 39 i/o i/o st ttl digital i/o. streaming parallel port data. rd2/spp2 rd2 spp2 21 40 40 i/o i/o st ttl digital i/o. streaming parallel port data. rd3/spp3 rd3 spp3 22 41 41 i/o i/o st ttl digital i/o. streaming parallel port data. rd4/spp4 rd4 spp4 27 2 2 i/o i/o st ttl digital i/o. streaming parallel port data. rd5/spp5/p1b rd5 spp5 p1b 28 3 3 i/o i/o o st ttl ? digital i/o. streaming parallel port data. eccp1 pwm output, channel b. rd6/spp6/p1c rd6 spp6 p1c 29 4 4 i/o i/o o st ttl ? digital i/o. streaming parallel port data. eccp1 pwm output, channel c. rd7/spp7/p1d rd7 spp7 p1d 30 5 5 i/o i/o o st ttl ? digital i/o. streaming parallel port data. eccp1 pwm output, channel d. table 1-3: pic18f4458/4553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description pdip qfn tqfp legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set. 3: these pins are no connect unless the icprt configuration bit is set. for nc/icports, the pin is no connect unless icprt is set and the debug configuration bit is cleared.
pic18f2458/2553/4458/4553 ds39887b-page 18 preliminary ? 2007 microchip technology inc. porte is a bidirectional i/o port. re0/an5/ck1spp re0 an5 ck1spp 82525 i/o i o st analog ? digital i/o. analog input 5. spp clock 1 output. re1/an6/ck2spp re1 an6 ck2spp 92626 i/o i o st analog ? digital i/o. analog input 6. spp clock 2 output. re2/an7/oespp re2 an7 oespp 10 27 27 i/o i o st analog ? digital i/o. analog input 7. spp output enable output. re3 ? ? ? ? ? see mclr /v pp /re3 pin. v ss 12, 31 6, 30, 31 6, 29 p ? ground reference for logic and i/o pins. v dd 11, 32 7, 8, 28, 29 7, 28 p ? positive supply for logic and i/o pins. v usb 18 37 37 o p ? ? internal usb transceiver power supply. when the internal usb regulator is enabled, v usb is the regulator output. when the internal usb regulator is disabled, v usb is the power input for the usb transceiver. nc/icck/icpgc (3) icck icpgc ??12 i/o i/o st st no connect or dedicated icd/icsp? port clock. in-circuit debugger clock. icsp programming clock. nc/icdt/icpgd (3) icdt icpgd ??13 i/o i/o st st no connect or dedicated icd/icsp port clock. in-circuit debugger data. icsp programming data. nc/icrst /icv pp (3) icrst icv pp ??33 i p ? ? no connect or dedicated icd/icsp port reset. master clear (reset) input. programming voltage input. nc/icports (3) icports ? ? 34 p ? no connect or 28-pin device emulation. enable 28-pin device emulation when connected to v ss . nc ? 13 ? ? ? no connect. table 1-3: pic18f4458/4553 pinout i/o descriptions (continued) pin name pin number pin type buffer type description pdip qfn tqfp legend: ttl = ttl compatible input cmos = cmos compatible input or output st = schmitt trigger input with cmos levels i = input o = output p = power note 1: alternate assignment for ccp2 when ccp2mx configuration bit is cleared. 2: default assignment for ccp2 when ccp2mx configuration bit is set. 3: these pins are no connect unless the icprt configuration bit is set. for nc/icports, the pin is no connect unless icprt is set and the debug configuration bit is cleared.
? 2007 microchip technology inc. preliminary ds39887b-page 19 pic18f2458/2553/4458/4553 2.0 12-bit analog-to-digital converter (a/d) module the analog-to-digital (a/d) converter module has 10 inputs for the 28-pin devices and 13 for the 40-pin and 44-pin devices. this module allows conversion of an analog input signal to a corresponding 12-bit digital number. the module has five registers: ? a/d result high register (adresh) ? a/d result low register (adresl) ? a/d control register 0 (adcon0) ? a/d control register 1 (adcon1) ? a/d control register 2 (adcon2) the adcon0 register, shown in register 2-1, controls the operation of the a/d module. the adcon1 register, shown in register 2-2, configures the functions of the port pins. the adcon2 register, shown in register 2-3, configures the a/d clock source, programmed acquisition time and justification. register 2-1: adcon0: a/ d control register 0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? chs3 chs2 chs1 chs0 go/done adon bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-6 unimplemented: read as ? 0 ? bit 5-2 chs3:chs0: analog channel select bits 0000 = channel 0 (an0) 0001 = channel 1 (an1) 0010 = channel 2 (an2) 0011 = channel 3 (an3) 0100 = channel 4 (an4) 0101 = channel 5 (an5) (1,2) 0110 = channel 6 (an6) (1,2) 0111 = channel 7 (an7) (1,2) 1000 = channel 8 (an8) 1001 = channel 9 (an9) 1010 = channel 10 (an10) 1011 = channel 11 (an11) 1100 = channel 12 (an12 1101 = unimplemented (2) 1110 = unimplemented (2) 1111 = unimplemented (2) bit 1 go/done : a/d conversion status bit when adon = 1 : 1 = a/d conversion in progress 0 = a/d idle bit 0 adon: a/d on bit 1 = a/d converter module is enabled 0 = a/d converter module is disabled note 1: these channels are not implemented on 28-pin devices. 2: performing a conversion on unimplemented channels will return a floating input measurement.
pic18f2458/2553/4458/4553 ds39887b-page 20 preliminary ? 2007 microchip technology inc. register 2-2: adcon1: a/ d control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w (1) r/w (1) r/w (1) ? ? vcfg1 vcfg0 pcfg3 pcfg2 pcfg1 pcfg0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-6 unimplemented: read as ? 0 ? bit 5 vcfg1: voltage reference configuration bit (v ref - source) 1 = v ref - (an2) 0 = v ss bit 4 vcfg0: voltage reference configuration bit (v ref + source) 1 = v ref + (an3) 0 = v dd bit 3-0 pcfg3:pcfg0: a/d port configuration control bits: note 1: the reset value of the pcfg bits depends on the value of the pbaden configuration bit. when pbaden = 1 , pcfg<3:0> = 0000 ; when pbaden = 0 , pcfg<3:0> = 0111 . 2: an5 through an7 are available only on 40-pin and 44-pin devices. a = analog input d = digital i/o pcfg3: pcfg0 an12 an11 an10 an9 an8 an7 (2) an6 (2) an5 (2) an4 an3 an2 an1 an0 0000 (1) a a aaaaaaaaaaa 0001 a a aaaaaaaaaaa 0010 a a aaaaaaaaaaa 0011 d a aaaaaaaaaaa 0100 dd aaaaaaaaaaa 0101 dddaaaaaaaaaa 0110 ddddaaaaaaaaa 0111 (1) dddddaaaaaaaa 1000 ddddddaaaaaaa 1001 dddddddaaaaaa 1010 d d ddddddaaaaa 1011 d d dddddddaaaa 1100 d d ddddddddaaa 1101 d d dddddddddaa 1110 d d dddddddddda 1111 d d ddddddddddd
? 2007 microchip technology inc. preliminary ds39887b-page 21 pic18f2458/2553/4458/4553 register 2-3: adcon2: a/ d control register 2 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adfm ? acqt2 acqt1 acqt0 adcs2 adcs1 adcs0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7 adfm: a/d result format select bit 1 = right justified 0 = left justified bit 6 unimplemented: read as ? 0 ? bit 5-3 acqt2:acqt0: a/d acquisition time select bits 111 = 20 t ad 110 = 16 t ad 101 = 12 t ad 100 = 8 t ad 011 = 6 t ad 010 = 4 t ad 001 = 2 t ad 000 = 0 t ad (1) bit 2-0 adcs2:adcs0: a/d conversion clock select bits 111 = f rc (clock derived from a/d rc oscillator) (1) 110 = f osc /64 101 = f osc /16 100 = f osc /4 011 = f rc (clock derived from a/d rc oscillator) (1) 010 = f osc /32 001 = f osc /8 000 = f osc /2 note 1: if the a/d f rc clock source is selected, a delay of one t cy (instruction cycle) is added before the a/d clock starts. this allows the sleep instruction to be executed before starting a conversion.
pic18f2458/2553/4458/4553 ds39887b-page 22 preliminary ? 2007 microchip technology inc. the analog reference voltage is software selectable to either the device?s positive and negative supply voltage (v dd and v ss ), or the voltage level on the ra3/an3/ v ref + and ra2/an2/v ref -/cv ref pins. the a/d converter has a unique feature of being able to operate while the device is in sleep mode. to oper- ate in sleep, the a/d conversion clock must be derived from the a/d?s internal rc oscillator. the output of the sample and hold is the input into the converter, which generates the result via successive approximation. a device reset forces all registers to their reset state. this forces the a/d module to be turned off and any conversion in progress is aborted. each port pin associated with the a/d converter can be configured as an analog input or as a digital i/o. the adresh and adresl registers contain the result of the a/d conversion. when the a/d conversion is com- plete, the result is loaded into the adresh:adresl register pair, the go/done bit (adcon0 register) is cleared and the a/d interrupt flag bit, adif, is set. the block diagram of the a/d module is shown in figure 2-1. figure 2-1: a/d block diagram (input voltage) v ain v ref + reference voltage v dd vcfg1:vcfg0 chs3:chs0 an7 (1) an6 (1) an5 (1) an4 an3 an2 an1 an0 0111 0110 0101 0100 0011 0010 0001 0000 12-bit a/d v ref - v ss converter an12 an11 an10 an9 an8 1100 1011 1010 1001 1000 note 1: channels an5 through an7 are not available on 28-pin devices. 0 x 1 x x 1 x 0
? 2007 microchip technology inc. preliminary ds39887b-page 23 pic18f2458/2553/4458/4553 the value in the adresh:adresl registers is unknown following power-on and brown-out resets, and is not affected by any other reset. after the a/d module has been configured as desired, the selected channel must be acquired before the conversion is started. the analog input channels must have their corresponding tris bits selected as an input. to determine acquisition time, see section 2.1 ?a/d acquisition requirements? . after this acquisi- tion time has elapsed, the a/d conversion can be started. an acquisition time can be programmed to occur between setting the go/done bit and the actual start of the conversion. the following steps should be followed to perform an a/d conversion: 1. configure the a/d module: ? configure analog pins, voltage reference and digital i/o (adcon1) ? select a/d input channel (adcon0) ? select a/d acquisition time (adcon2) ? select a/d conversion clock (adcon2) ? turn on a/d module (adcon0) 2. configure a/d interrupt (if desired): ? clear adif bit ? set adie bit ? set gie bit 3. wait the required acquisition time (if required). 4. start conversion: ? set go/done bit (adcon0 register) 5. wait for a/d conversion to complete, by either: ? polling for the go/done bit to be cleared or ? waiting for the a/d interrupt 6. read a/d result registers (adresh:adresl); clear bit adif, if required. 7. for next conversion, go to step 1 or step 2, as required. the a/d conversion time per bit is defined as t ad . a minimum wait of 2 t ad is required before the next acquisition starts. figure 2-2: a/d transfer function figure 2-3: analog input model digital code output ffeh 003h 002h 001h 000h 0.5 lsb 1 lsb 1.5 lsb 2 lsb 2.5 lsb 4094 lsb 4094.5 lsb 3 lsb analog input voltage fffh 4095 lsb 4095.5 lsb v ain c pin rs anx 5 pf v t = 0.6v v t = 0.6v i leakage r ic 1k sampling switch ss r ss c hold = 25 pf v ss v dd 100 na legend: c pin v t i leakage r ic ss c hold = input capacitance = threshold voltage = leakage current at the pin due to = interconnect resistance = sampling switch = sample/hold capacitance (from dac) various junctions = sampling switch resistance r ss v dd 6v sampling switch 5v 4v 3v 2v 123 4 (k )
pic18f2458/2553/4458/4553 ds39887b-page 24 preliminary ? 2007 microchip technology inc. 2.1 a/d acquisition requirements for the a/d converter to meet its specified accuracy, the charge holding capacitor (c hold ) must be allowed to fully charge to the input channel voltage level. the analog input model is shown in figure 2-3. the source impedance (r s ) and the internal sampling switch (r ss ) impedance directly affect the time required to charge the capacitor c hold . the sampling switch (r ss ) impedance varies over the device voltage (v dd ). the source impedance affects the offset voltage at the ana- log input (due to pin leakage current). the maximum recommended impedance for analog sources is 2.5 k . after the analog input channel is selected (changed), the channel must be sampled for at least the minimum acquisition time before starting a conversion. to calculate the minimum acquisition time, equation 2-1 may be used. this equation assumes that 1/2 lsb error is used (4096 steps for the 12-bit a/d). the 1/2 lsb error is the maximum error allowed for the a/d to meet its specified resolution. example 2-3 shows the calculation of the minimum required acquisition time, t acq . this calculation is based on the following application system assumptions: c hold = 25 pf rs = 2.5 k conversion error 1/2 lsb v dd =3v rss = 4 k temperature = 85 c (system max.) equation 2-1: acquisition time equation 2-2: a/d minimum charging time equation 2-3: calculating the minimum required acquisition time note: when the conversion is started, the holding capacitor is disconnected from the input pin. t acq = amplifier settling time + holding capacitor charging time + temperature coefficient =t amp + t c + t coff v hold = (v ref ? (v ref /4096)) ? (1 ? e (-t c /c hold (r ic + r ss + r s )) ) or t c = -(c hold )(r ic + r ss + r s ) ln(1/4096) t acq =t amp + t c + t coff t amp =0.2 s t coff = (temp ? 25 c)(0.02 s/ c) (85 c ? 25 c)(0.02 s/ c) 1.2 s temperature coefficient is only required for temperatures > 25 c. below 25 c, t coff = 0 s. t c = -(c hold )(r ic + r ss + r s ) ln(1/4096) s -(25 pf) (1 k + 4 k + 2.5 k ) ln(0.0002441) s 1.56 s t acq = 0.2 s + 1.56 s + 1.2 s 2.96 s
? 2007 microchip technology inc. preliminary ds39887b-page 25 pic18f2458/2553/4458/4553 2.2 selecting and configuring acquisition time the adcon2 register allows the user to select an acquisition time that occurs each time the go/done bit is set. it also gives users the option to use an automatically determined acquisition time. acquisition time may be set with the acqt2:acqt0 bits (adcon2<5:3>), which provides a range of 2 to 20 t ad . when the go/done bit is set, the a/d module continues to sample the input for the selected acquisi- tion time, then automatically begins a conversion. since the acquisition time is programmed, there may be no need to wait for an acquisition time between selecting a channel and setting the go/done bit. manual acquisition is selected when acqt2:acqt0 = 000 . when the go/done bit is set, sampling is stopped and a conversion begins. the user is responsible for ensuring the required acquisition time has passed between selecting the desired input channel and setting the go/done bit. this option is also the default reset state of the acqt2:acqt0 bits and is compatible with devices that do not offer programmable acquisition times. in either case, when the conversion is completed, the go/done bit is cleared, the adif flag is set and the a/d begins sampling the currently selected channel again. if an acquisition time is programmed, there is nothing to indicate if the acquisition time has ended or if the conversion has begun. 2.3 selecting the a/d conversion clock the a/d conversion time per bit is defined as t ad . the a/d conversion requires 13 t ad per 12-bit conversion. the source of the a/d conversion clock is software selectable. there are seven possible options for t ad : ?2 t osc ?4 t osc ?8 t osc ?16 t osc ?32 t osc ?64 t osc ? internal rc oscillator for correct a/d conversions, the a/d conversion clock (t ad ) must be as short as possible, but greater than the minimum t ad (see parameter 130 for more information). table 2-1 shows the resultant t ad times derived from the device operating frequencies and the a/d clock source selected. table 2-1: t ad vs. device operating frequencies a/d clock source (t ad ) assumes t ad min. = 0.8 s operation adcs2:adcs0 maximum f osc 2 t osc 000 2.50 mhz 4 t osc 100 5.00 mhz 8 t osc 001 10.00 mhz 16 t osc 101 20.00 mhz 32 t osc 010 40.00 mhz 64 t osc 110 48.00 mhz rc (1) x11 1.00 mhz (2) note 1: the rc source has a typical t ad time of 2.5 s. 2: for device frequencies above 1 mhz, the device must be in sleep for the entire conversion or a f osc divider should be used instead; otherwise, the a/d accuracy specification may not be met.
pic18f2458/2553/4458/4553 ds39887b-page 26 preliminary ? 2007 microchip technology inc. 2.4 operation in power-managed modes the selection of the automatic acquisition time and a/d conversion clock is determined in part by the clock source and frequency while in a power-managed mode. if the a/d is expected to operate while the device is in a power-managed mode, the adcs2:adcs0 bits in adcon2 should be updated in accordance with the clock source to be used. the acqt2:acqt0 bits do not need to be adjusted as the adcs2:adcs0 bits adjust the t ad time for the new clock speed. after entering the mode, an a/d acquisition or conversion may be started. once started, the device should continue to be clocked by the same clock source until the conversion has been completed. if desired, the device may be placed into the corresponding idle mode during the conversion. if the device clock frequency is less than 1 mhz, the a/d rc clock source should be selected. operation in sleep mode requires the a/d f rc clock to be selected. if bits acqt2:acqt0 are set to ? 000 ? and a conversion is started, the conversion will be delayed one instruction cycle to allow execution of the sleep instruction and entry to sleep mode. the idlen bit (osccon<7>) must have already been cleared prior to starting the conversion. 2.5 configuring analog port pins the adcon1, trisa, trisb and trise registers all configure the a/d port pins. the port pins needed as analog inputs must have their corresponding tris bits set (input). if the tris bit is cleared (output), the digital output level (v oh or v ol ) will be converted. the a/d operation is independent of the state of the chs3:chs0 bits and the tris bits. note 1: when reading the port register, all pins configured as analog input channels will read as cleared (a low level). analog con- version on pins configured as digital pins can be performed. the voltage on the pin will be accurately converted. 2: analog levels on any pin defined as a dig- ital input may cause the digital input buffer to consume current out of the device?s specification limits. 3: the pbaden bit in configuration register 3h configures portb pins to reset as analog or digital pins by control- ling how the pcfg3:pcfg0 bits in adcon1 are reset.
? 2007 microchip technology inc. preliminary ds39887b-page 27 pic18f2458/2553/4458/4553 2.6 a/d conversions figure 2-4 shows the operation of the a/d converter after the go/done bit has been set and the acqt2:acqt0 bits are cleared. a conversion is started after the following instruction to allow entry into sleep mode before the conversion begins. figure 2-5 shows the operation of the a/d converter after the go/done bit has been set and the acqt2:acqt0 bits are set to ? 010 ?, and selecting a 4t ad acquisition time before the conversion starts. clearing the go/done bit during a conversion will abort the current conversion. the a/ d result register pair will not be updated with the partially completed a/d conversion sample. this means the adresh:adresl registers will continue to contain the value of the last completed conversion (or the last value written to the adresh:adresl registers). after the a/d conversion is completed or aborted, a 2t cy wait is required before the next acquisition can be started. after this wait, acquisition on the selected channel is automatically started. 2.7 discharge the discharge phase is used to initialize the value of the holding capacitor. the array is discharged before every sample. this feature helps to optimize the unity gain amplifier, as the circuit always needs to charge the capacitor array, rather than charge/discharge based on previous measure values. figure 2-4: a/d conversion t ad cycles (acqt<2:0> = 000 , t acq = 0 ) figure 2-5: a/d conversion t ad cycles (acqt<2:0> = 010 , t acq = 4 t ad ) note: the go/done bit should not be set in the same instruction that turns on the a/d. code should wait at least 2 s after enabling the a/d before beginning an acquisition and conversion cycle. t ad 1 t ad 2 t ad 3 t ad 4 t ad 5 t ad 6 t ad 7 t ad 8 t ad 11 set go/done bit holding capacitor is disconnected from analog input (typically 100 ns) t ad 9 t ad 10 t cy ? t ad adresh:adresl are loaded, go/done bit is cleared, adif bit is set, holding capacitor is connected to analog input. conversion starts b2 b11 b8 b7 b6 b5 b4 b3 b10 b9 on the following cycle: discharge t ad 13 t ad 12 b0 b1 t ad 1 (typically 200 ns) 1 2 3 4 5 6 7 8 13 set go/done bit (holding capacitor is disconnected) 9 12 conversion starts 1 2 3 4 (holding capacitor continues acquiring input) t acqt cycles t ad cycles automatic acquisition time b0 b11 b8 b7 b6 b5 b4 b1 b10 b9 adresh:adresl are loaded, go/done bit is cleared, adif bit is set, holding capacitor is connected to analog input. on the following cycle: t ad 1 discharge 10 11 b3 b2 (typically 200 ns)
pic18f2458/2553/4458/4553 ds39887b-page 28 preliminary ? 2007 microchip technology inc. 2.8 use of the ccp2 trigger an a/d conversion can be started by the special event trigger of the ccp2 module. this requires that the ccp2m3:ccp2m0 bits (ccp2con<3:0>) be pro- grammed as ? 1011 ? and that the a/d module is enabled (adon bit is set). when the trigger occurs, the go/ done bit will be set, starting the a/d acquisition and conversion, and the timer1 (or timer3) counter will be reset to zero. timer1 (or timer3) is reset to automatically repeat the a/d acquisition period with minimal software overhead (firmware must move adresh:adresl to the desired location). the appropriate analog input channel must be selected and the minimum acquisition period is either timed by the user, or an appropriate t acq time selected before the special event trigger sets the go/done bit (starts a conversion). if the a/d module is not enabled (adon is cleared), the special event trigger will be ignored by the a/d module, but will still reset the timer1 (or timer3) counter. table 2-2: registers associated with a/d operation name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reset values on page: intcon gie/gieh peie/giel tmr0ie int0ie rbie tmr0if int0if rbif (4) pir1 sppif (1) adif rcif txif sspif ccp1if tmr2if tmr1if (4) pie1 sppie (1) adie rcie txie sspie ccp1ie tmr2ie tmr1ie (4) ipr1 sppip (1) adip rcip txip sspip ccp1ip tmr2ip tmr1ip (4) pir2 oscfif cmif usbif eeif bclif hlvdif tmr3if ccp2if (4) pie2 oscfie cmie usbie eeie bclie hlvdie tmr3ie ccp2ie (4) ipr2 oscfip cmip usbip eeip bclip hlvdip tmr3ip ccp2ip (4) adresh a/d result register high byte (4) adresl a/d result register low byte (4) adcon0 ? ? chs3 chs2 chs1 chs0 go/done adon 19 adcon1 ? ? vcfg1 vcfg0 pcfg3 pcfg2 pcfg1 pcfg0 20 adcon2 adfm ? acqt2 acqt1 acqt0 adcs2 adcs1 adcs0 21 porta ?ra6 (2) ra5 ra4 ra3 ra2 ra1 ra0 (4) trisa ? trisa6 (2) porta data direction control register (4) portb rb7 rb6 rb5 rb4 rb3 rb2 rb1 rb0 (4) trisb portb data direction control register (4) latb portb data latch register (read and write to data latch) (4) porte (1) rdpu ? ? ?re3 (3) re2 (1) re1 (1) re0 (1) (4) trise (1) ? ? ? ? ? trise2 trise1 trise0 (4) late (1) ? ? ? ? ? porte data latch register (4) legend: ? = unimplemented, read as ? 0 ?. shaded cells are not used for a/d conversion. note 1: these registers and/or bits are not implemented on 28-pin devices and are read as ? 0 ?. 2: ra6 and its associated latch and data direction bits are enabled as i/o pins based on oscillator configuration; otherwise, they are read as ? 0 ?. 3: re3 port bit is available only as an input pin when the mclre configuration bit is ? 0 ?. 4: for these reset values, see the ?pic18f2455/2550/4455/4550 data sheet? .
? 2007 microchip technology inc. preliminary ds39887b-page 29 pic18f2458/2553/4458/4553 3.0 special features of the cpu pic18f2458/2553/4458/4553 devices include several features intended to maximize reliability and minimize cost through elimination of external components. these include: ? device id registers 3.1 device id registers the device id registers are ?read-only? registers. they identify the device type and revision to device programmers, and can be read by firmware using table reads. table 3-1: device ids note: for additional details on the con- figuration bits, refer to the ?pic18f2455/2550/4455/4550 data sheet? , section 25.1 ?configuration bits? . device id information presented in this section is for pic18f2458/2553/4458/4553 only. file name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 default/ unprogrammed value 3ffffeh devid1 dev2 dev1 dev0 rev4 rev3 rev2 rev1 rev0 xxxx xxxx (1) 3fffffh devid2 dev10 dev9 dev8 dev7 dev6 dev5 dev4 dev3 xxxx xxxx (1) legend: x = unknown, u = unchanged note 1: see register 3-1 and register 3-2 for devid values. devid registers are read-only and cann ot be programmed by the user.
pic18f2458/2553/4458/4553 ds39887b-page 30 preliminary ? 2007 microchip technology inc. register 3-1: devid1: device id register 1 for pic18f2458/2553/4458/4553 devices rrrrrrrr dev2 dev1 dev0 rev4 rev3 rev2 rev1 rev0 bit 7 bit 0 legend: r = read-only bit p = programmable bit u = unimplemented bit, read as ?0? -n = value when device is unprogrammed u = unchanged from programmed state bit 7-5 dev2:dev0: device id bits see register 3-2 for a complete listing. bit 4-0 rev3:rev0: revision id bits these bits are used to indicate the device revision. register 3-2: devid2: device id register 2 for pic18f2458/2553/4458/4553 devices rrrrrrrr dev10 dev9 dev8 dev7 dev6 dev5 dev4 dev3 bit 7 bit 0 legend: r = read-only bit p = programmable bit u = unimplemented bit, read as ?0? -n = value when device is unprogrammed u = unchanged from programmed state bit 7-0 dev10:dev3: device id bits dev10:dev3 (devid2<7:0>) dev2:dev0 (devid1<7:5>) device 0010 1010 011 pic18f2458 0010 1010 010 pic18f2553 0010 1010 001 pic18f4458 0010 1010 000 pic18f4553
? 2007 microchip technology inc. preliminary ds39887b-page 31 pic18f2458/2553/4458/4553 4.0 electrical characteristics absolute maximum ratings (?) ambient temperature under bias................................................................................................. ............-40c to +125c storage temperature ............................................................................................................ .................. -65c to +150c voltage on any pin with respect to v ss (except v dd and mclr ) ................................................... -0.3v to (v dd + 0.3v) voltage on v dd with respect to v ss ......................................................................................................... -0.3v to +7.5v voltage on mclr with respect to v ss (note 2) ......................................................................................... 0v to +13.25v total power dissipation (note 1) ............................................................................................................................... 1.0w maximum current out of v ss pin ........................................................................................................................... 300 ma maximum current into v dd pin ........................................................................................................................... ...250 ma input clamp current, i ik (v i < 0 or v i > v dd ) ...................................................................................................................... 20 ma output clamp current, i ok (v o < 0 or v o > v dd ) .............................................................................................................. 20 ma maximum output current sunk by any i/o pin..................................................................................... .....................25 ma maximum output current sourced by any i/o pin .................................................................................. ..................25 ma maximum current sunk by all ports ...................................................................................................................... .200 ma maximum current sourced by all ports ........................................................................................... .......................200 ma note 1: power dissipation is calculated as follows: pdis = v dd x {i dd ? i oh } + {(v dd ? v oh ) x i oh } + (v ol x i ol ) 2: voltage spikes below v ss at the mclr /v pp /re3 pin, inducing currents greater than 80 ma, may cause latch-up. thus, a series resistor of 50-100 should be used when applying a ?low? level to the mclr /v pp / re3 pin, rather than pulling this pin directly to v ss . ? notice: stresses above those listed under ?absolute maximum ratings? may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability.
pic18f2458/2553/4458/4553 ds39887b-page 32 preliminary ? 2007 microchip technology inc. figure 4-1: pic18f2458/2553/4458/4553 voltage-frequency graph (industrial) figure 4-2: pic18lf2458/2553/4458/4553 volt age-frequency graph (industrial) frequency voltage 6.0v 5.5v 4.5v 4.0v 2.0v 48 mhz 5.0v 3.5v 3.0v 2.5v pic18f2458/2553/4458/4553 4.2v frequency voltage 6.0v 5.5v 4.5v 4.0v 2.0v 40 mhz 5.0v 3.5v 3.0v 2.5v for 2.0v v dd < 4.2v: f max = (16.36 mhz/v) (v ddappmin ? 2.0v) + 4 mhz note: v ddappmin is the minimum voltage of the pic ? device in the application. 4 mhz 4.2v 48 mhz pic18lf2458/2553/4458/4553 for 4.2v v dd : f max = 48 mhz
? 2007 microchip technology inc. preliminary ds39887b-page 33 pic18f2458/2553/4458/4553 table 4-1: a/d converter characteristics: pic18f2458/2553/4458/4553 (industrial) pic18lf2458/2553/4458/4553 (industrial) param no. sym characteristic min typ max units conditions a01 n r resolution ? ? 12 bit v ref 3.0v a03 e il integral linearity error ? 1 2.0 lsb v dd = 3.0v v ref 3.0v ??2.0lsbv dd = 5.0v a04 e dl differential linearity error ? 1 +1.5/-1.0 lsb v dd = 3.0v v ref 3.0v ??+1.5/-1.0lsbv dd = 5.0v a06 e off offset error ? 1 5 lsb v dd = 3.0v v ref 3.0v ??3lsbv dd = 5.0v a07 e gn gain error ? 1 1.25 lsb v dd = 3.0v v ref 3.0v ??2.00lsbv dd = 5.0v a10 ? monotonicity guaranteed (1) ?v ss v ain v ref a20 v ref reference voltage range (v refh ? v refl ) 3?v dd ? v ss v for 12-bit resolution a21 v refh reference voltage high v ss + 3.0v ? v dd + 0.3v v for 12-bit resolution a22 v refl reference voltage low v ss ? 0.3v ? v dd ? 3.0v v for 12-bit resolution a25 v ain analog input voltage v refl ?v refh v a30 z ain recommended impedance of analog voltage source ??2.5k a50 i ref v ref input current (2) ? ? ? ? 5 150 a a during v ain acquisition. during a/d conversion cycle. note 1: the a/d conversion result never decreases with an increase in the input voltage and has no missing codes. 2: v refh current is from the ra3/an3/v ref + pin or v dd , whichever is selected as the v refh source. v refl current is from the ra2/an2/v ref -/cv ref pin or v ss , whichever is selected as the v refl source.
pic18f2458/2553/4458/4553 ds39887b-page 34 preliminary ? 2007 microchip technology inc. figure 4-3: a/d conversion timing table 4-2: a/d conversion requirements 131 130 132 bsf adcon0, go q4 a/d clk (1) a/d data adres adif go sample old_data sampling stopped done new_data (note 2) 11 10 9 3 2 1 note 1: if the a/d clock source is selected as rc, a time of t cy is added before the a/d clock starts. this allows the sleep instruction to be executed. 2: this is a minimal rc delay (typically 100 ns), which also disconnects the holding capacitor from the analog input. . . . . . . t cy 0 param no. symbol characteristic min max units conditions 130 t ad a/d clock period pic18 f xxxx 0.8 12.5 (1) st osc based, v ref 3.0v pic18 lf xxxx 1.4 25.0 (1) sv dd = 3.0v; t osc based, v ref full range pic18 f xxxx ? 1 s a/d rc mode pic18 lf xxxx ? 3 sv dd = 3.0v; a/d rc mode 131 t cnv conversion time (not including acquisition time) (2) 13 14 t ad 132 t acq acquisition time (3) 1.4 ? s 135 t swc switching time from convert sample ? (note 4) 137 t dis discharge time 0.2 ? s note 1: the time of the a/d clock period is dependent on the device frequency and the t ad clock divider. 2: adres registers may be read on the following t cy cycle. 3: the time for the holding capacitor to acquire the ?new? input voltage when the voltage changes full scale after the conversion (v dd to v ss or v ss to v dd ). the source impedance (r s ) on the input channels is 50 . 4: on the following cycle of the device clock.
? 2007 microchip technology inc. preliminary ds39887b-page 35 pic18f2458/2553/4458/4553 5.0 packaging information for packaging information, see the ?pic18f2455/ 2550/4455/4550 data sheet? (ds39632).
pic18f2458/2553/4458/4553 ds39887b-page 36 preliminary ? 2007 microchip technology inc. notes:
? 2007 microchip technology inc. preliminary ds39887b-page 37 pic18f2458/2553/4458/4553 appendix a: revision history revision a (may 2007) original data sheet for the pic18f2458/2553/4458/ 4553 devices. revision b (june 2007) changes to figure 4-2: pic18lf2458/2553/4458/4553 voltage-frequency graph (industrial). appendix b: device differences the differences between the devices listed in this data sheet are shown in table b-1. table b-1: device differences features pic18f2458 pic18f2553 pic18f4458 pic18f4553 program memory (bytes) 24576 32768 24576 32768 program memory (instructions) 12288 16384 12288 16384 interrupt sources 19 19 20 20 i/o ports ports a, b, c, (e) ports a, b, c, (e) ports a, b, c, d, e ports a, b, c, d, e capture/compare/pwm modules 2 2 1 1 enhanced capture/compare/ pwm modules 0011 parallel communications (spp) no no yes yes 12-bit analog-to-digital module 10 input channels 10 input channels 13 input channels 13 input channels packages 28-pin spdip 28-pin soic 28-pin spdip 28-pin soic 40-pin pdip 44-pin tqfp 44-pin qfn 40-pin pdip 44-pin tqfp 44-pin qfn
pic18f2458/2553/4458/4553 ds39887b-page 38 preliminary ? 2007 microchip technology inc. appendix c: migration from mid-range to enhanced devices a detailed discussion of the differences between the mid-range mcu devices (i.e., pic16cxxx) and the enhanced devices (i.e., pic18fxxx) is provided in an716, ?migrating designs from pic16c74a/74b to pic18c442? . the changes discussed, while device specific, are generally applicable to all mid-range to enhanced device migrations. this application note is available as literature number ds00716. appendix d: migration from high-end to enhanced devices a detailed discussion of the migration pathway and differences between the high-end mcu devices (i.e., pic17cxxx) and the enhanced devices (i.e., pic18fxxx) is provided in an726, ?pic17cxxx to pic18cxxx migration? . this application note is available as literature number ds00726.
? 2007 microchip technology inc. preliminary ds39887b-page 39 pic18f2458/2553/4458/4553 index a a/d ..................................................................................... 19 a/d converter interrupt, configuring ......................... 23 acquisition requirements .......................................... 24 adcon0 register ...................................................... 19 adcon1 register ...................................................... 19 adcon2 register ...................................................... 19 adresh register ................................................ 19, 22 adresl register ...................................................... 19 analog port pins, configuring .................................... 26 associated registers ................................................. 28 calculating the minimum required acquisition time ................................................ 24 configuring the module .............................................. 23 conversion clock (t ad ) ............................................. 25 conversion status (go/done bit) ............................ 22 conversions ............................................................... 27 converter characteristics .......................................... 33 discharge ................................................................... 27 operation in power-managed modes ........................ 26 selecting and configuring acquisition time .............. 25 special event trigger (ccp) ...................................... 28 use of the ccp2 trigger ............................................ 28 absolute maximum ratings ............................................... 31 adcon0 register .............................................................. 19 go/done bit ............................................................. 22 adcon1 register .............................................................. 19 adcon2 register .............................................................. 19 adresh register .............................................................. 19 adresl register ........................................................ 19, 22 analog-to-digital converter. see a/d. b block diagrams a/d ............................................................................. 22 analog input model .................................................... 23 pic18f2458/2553 ........................................................ 7 pic18f4458/4553 ........................................................ 8 c compare (ccp module) special event trigger ................................................. 28 configuration bits ............................................................... 29 customer change notification service .............................. 41 customer notification service ............................................ 41 customer support .............................................................. 41 d device differences ............................................................. 37 device id registers ........................................................... 29 device overview .................................................................. 5 other special features ................................................ 5 e electrical characteristics .................................................... 31 equations a/d acquisition time .................................................. 24 a/d minimum charging time ..................................... 24 errata ................................................................................... 4 i internet address ................................................................. 41 interrupt sources a/d conversion complete ......................................... 23 m microchip internet web site ............................................... 41 migration from high-end to enhanced devices ..................................................... 38 migration from mid-range to enhanced devices ..................................................... 38 p packaging information ....................................................... 35 pin functions mclr /v pp /re3 ........................................................... 9 mclr /v pp /re3 ......................................................... 13 nc/icck/icpgc ....................................................... 18 nc/icdt/icpgd ........................................................ 18 nc/icports ............................................................ 18 nc/icrst /icv pp ....................................................... 18 osc1/clki ............................................................ 9, 13 osc2/clko/ra6 .................................................. 9, 13 ra0/an0 .............................................................. 10, 14 ra1/an1 .............................................................. 10, 14 ra2/an2/v ref -/cv ref ....................................... 10, 14 ra3/an3/v ref + .................................................. 10, 14 ra4/t0cki/c1out/rcv ..................................... 10, 14 ra5/an4/ss /hlvdin/c2out ............................ 10, 14 rb0/an12/int0/flt0/sdi/sda .......................... 11, 15 rb1/an10/int1/sck/scl .................................. 11, 15 rb2/an8/int2/vmo ............................................ 11, 15 rb3/an9/ccp2/vpo .......................................... 11, 15 rb4/an11/kbi0 ......................................................... 11 rb4/an11/kbi0/csspp ............................................ 15 rb5/kbi1/pgm .................................................... 11, 15 rb6/kbi2/pgc .................................................... 11, 15 rb7/kbi3/pgd .................................................... 11, 15 rc0/t1oso/t13cki ........................................... 12, 16 rc1/t1osi/ccp2/uoe ....................................... 12, 16 rc2/ccp1 ................................................................. 12 rc2/ccp1/p1a ......................................................... 16 rc4/d-/vm .......................................................... 12, 16 rc5/d+/vp .......................................................... 12, 16 rc6/tx/ck .......................................................... 12, 16 rc7/rx/dt/sdo ................................................. 12, 16 rd0/spp0 ................................................................. 17 rd1/spp1 ................................................................. 17 rd2/spp2 ................................................................. 17 rd3/spp3 ................................................................. 17 rd4/spp4 ................................................................. 17 rd5/spp5/p1b ......................................................... 17 rd6/spp6/p1c ......................................................... 17 rd7/spp7/p1d ......................................................... 17 re0/an5/ck1spp .................................................... 18 re1/an6/ck2spp .................................................... 18 re2/an7/oespp ...................................................... 18 v dd ...................................................................... 12, 18 v ss ...................................................................... 12, 18 v usb .................................................................... 12, 18 pinout i/o descriptions pic18f2458/2553 ....................................................... 9 pic18f4458/4553 ..................................................... 13 power-managed modes and a/d operation ..................................................... 26
pic18f2458/2553/4458/4553 ds39887b-page 40 preliminary ? 2007 microchip technology inc. r reader response .............................................................. 42 registers adcon0 (a/d control 0) ........................................... 19 adcon1 (a/d control 1) ........................................... 20 adcon2 (a/d control 2) ........................................... 21 devid1 (device id 1) ................................................ 30 devid2 (device id 2) ................................................ 30 revision history ................................................................. 37 s special features of the cpu .............................................. 29 t timing diagrams a/d conversion .......................................................... 34 timing diagrams and specifications a/d conversion requirements .................................. 34 w www address .................................................................. 41 www, on-line support ........ .............................................. 4
? 2007 microchip technology inc. preliminary ds39887b-page 41 pic18f2458/2553/4458/4553 the microchip web site microchip provides online support via our www site at www.microchip.com. this web site is used as a means to make files and information easily available to customers. accessible by using your favorite internet browser, the web site contains the following information: ? product support ? data sheets and errata, application notes and sample programs, design resources, user?s guides and hardware support documents, latest software releases and archived software ? general technical support ? frequently asked questions (faq), technical support requests, online discussion groups, microchip consultant program member listing ? business of microchip ? product selector and ordering guides, latest microchip press releases, listing of seminars and events, listings of microchip sales offices, distributors and factory representatives customer change notification service microchip?s customer notification service helps keep customers current on microchip products. subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. to register, access the microchip web site at www.microchip.com, click on customer change notification and follow the registration instructions. customer support users of microchip products can receive assistance through several channels: ? distributor or representative ? local sales office ? field application engineer (fae) ? technical support ? development systems information line customers should contact their distributor, representative or field application engineer (fae) for support. local sales offices are also available to help customers. a listing of sales offices and locations is included in the back of this document. technical support is available through the web site at: http://support.microchip.com
pic18f2458/2553/4458/4553 ds39887b-page 42 preliminary ? 2007 microchip technology inc. reader response it is our intention to provide you with the best documentation possible to ensure successful use of your microchip prod- uct. if you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation can better serve you, please fax your comments to the technical publications manager at (480) 792-4150. please list the following information, and use this outline to provide us with your comments about this document. to : technical publications manager re: reader response total pages sent ________ from: name company address city / state / zip / country telephone: (_______) _________ - _________ application (optional): would you like a reply? y n device: literature number: questions: fax: (______) _________ - _________ ds39887b pic18f2458/2553/4458/4553 1. what are the best features of this document? 2. how does this document meet your hardware and software development needs? 3. do you find the organization of this document easy to follow? if not, why? 4. what additions to the document do you think would enhance the structure and subject? 5. what deletions from the document could be made without affecting the overall usefulness? 6. is there any incorrect or misleading information (what and where)? 7. how would you improve this document?
? 2007 microchip technology inc. preliminary ds39887b-page 43 pic18f2458/2553/4458/4553 product identification system to order or obtain information, e. g., on pricing or delivery, refer to the factory or the listed sales office . part no. x /xx xxx pattern package temperature range device device pic18f2458/2553 (1) , pic18f4458/4553 (1) , pic18f2458/2553t (2) , pic18f4458/4553t (2) ; v dd range 4.2v to 5.5v pic18lf2458/2553 (1) , pic18lf4458/4553 (1) , pic18lf2458/2553t (2) , pic18lf4458/4553t (2) ; v dd range 2.0v to 5.5v temperature range i = -40 c to +85 c (industrial) e= -40 c to +125 c (extended) package pt = tqfp (thin quad flatpack) so = soic sp = skinny pdip p=pdip ml = qfn pattern qtp, sqtp, code or special requirements (blank otherwise) examples: a) pic18lf4553-i/p 301 = industrial temp., pdip package, extended v dd limits, qtp pattern #301. b) pic18lf2458-i/so = industrial temp., soic package, extended v dd limits. c) pic18f4458-i/p = industrial temp., pdip package, normal v dd limits. note 1: f = standard voltage range lf = wide voltage range 2: t = in tape and reel tqfp packages only.
ds39887b-page 44 preliminary ? 2007 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://support.microchip.com web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 kokomo kokomo, in tel: 765-864-8360 fax: 765-864-8387 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8528-2100 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - fuzhou tel: 86-591-8750-3506 fax: 86-591-8750-3521 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - shunde tel: 86-757-2839-5507 fax: 86-757-2839-5571 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 asia/pacific india - bangalore tel: 91-80-4182-8400 fax: 91-80-4182-8422 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - penang tel: 60-4-646-8870 fax: 60-4-646-5086 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-572-9526 fax: 886-3-572-6459 taiwan - kaohsiung tel: 886-7-536-4818 fax: 886-7-536-4803 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 w orldwide s ales and s ervice 06/25/07


▲Up To Search▲   

 
Price & Availability of PIC18F2458-IML

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X